<!DOCTYPE html>
<html lang="en-US" dir="ltr">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Utility Methods | SimpleMindMap</title>
    <meta name="description" content="A powerful web mind map">
    <meta name="generator" content="VitePress v1.3.3">
    <link rel="preload stylesheet" href="/mind-map-docs/assets/style.m6R34cWr.css" as="style">
    
    <script type="module" src="/mind-map-docs/assets/app.CayW-_xc.js"></script>
    <link rel="preload" href="/mind-map-docs/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
    <link rel="modulepreload" href="/mind-map-docs/assets/chunks/theme.iyWGNaji.js">
    <link rel="modulepreload" href="/mind-map-docs/assets/chunks/framework.B358x4hV.js">
    <link rel="modulepreload" href="/mind-map-docs/assets/en_api_utils.md.C--N5wPv.lean.js">
    <link rel="icon" href="/mind-map-docs/logo.png">
    <script src="//sdk.51.la/js-sdk-pro.min.js" charset="UTF-8" id="LA_COLLECT"></script>
    <script>try{LA.init({id:"KRO0WxK8GT66tYCQ",ck:"KRO0WxK8GT66tYCQ",autoTrack:!1})}catch(t){console.log(t)}</script>
    <script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
    <script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
  </head>
  <body>
    <div id="app"><div class="Layout" data-v-5d98c3a5><!--[--><!--]--><!--[--><span tabindex="-1" data-v-0f60ec36></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-0f60ec36> Skip to content </a><!--]--><!----><header class="VPNav" data-v-5d98c3a5 data-v-ae24b3ad><div class="VPNavBar has-sidebar top" data-v-ae24b3ad data-v-6aa21345><div class="wrapper" data-v-6aa21345><div class="container" data-v-6aa21345><div class="title" data-v-6aa21345><div class="VPNavBarTitle has-sidebar" data-v-6aa21345 data-v-ab179fa1><a class="title" href="/mind-map-docs/en/" data-v-ab179fa1><!--[--><!--]--><!--[--><img class="VPImage logo" src="/mind-map-docs/logo.png" alt data-v-8426fc1a><!--]--><span data-v-ab179fa1>SimpleMindMap</span><!--[--><!--]--></a></div></div><div class="content" data-v-6aa21345><div class="content-body" data-v-6aa21345><!--[--><!--]--><div class="VPNavBarSearch search" data-v-6aa21345><!--[--><!----><div id="local-search"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><span class="vp-icon DocSearch-Search-Icon"></span><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-6aa21345 data-v-dc692963><span id="main-nav-aria-label" class="visually-hidden" data-v-dc692963> Main Navigation </span><!--[--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://wanglin2.github.io/mind-map/" target="_blank" rel="noreferrer" tabindex="0" data-v-dc692963 data-v-9c663999><!--[--><span data-v-9c663999>Online use</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/mind-map-docs/en/client.html" tabindex="0" data-v-dc692963 data-v-9c663999><!--[--><span data-v-9c663999>Client</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/mind-map-docs/cloudStorage.html" tabindex="0" data-v-dc692963 data-v-9c663999><!--[--><span data-v-9c663999>Cloud storage</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/mind-map-docs/en/start/introduction.html" tabindex="0" data-v-dc692963 data-v-9c663999><!--[--><span data-v-9c663999>Start</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/mind-map-docs/course/course1.html" tabindex="0" data-v-dc692963 data-v-9c663999><!--[--><span data-v-9c663999>Course</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink active" href="/mind-map-docs/en/api/constructor/constructor-options.html" tabindex="0" data-v-dc692963 data-v-9c663999><!--[--><span data-v-9c663999>API</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/mind-map-docs/en/plugins/themes.html" tabindex="0" data-v-dc692963 data-v-9c663999><!--[--><span data-v-9c663999>Plugins</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/mind-map-docs/help/help1.html" tabindex="0" data-v-dc692963 data-v-9c663999><!--[--><span data-v-9c663999>Help</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/mind-map-docs/sponsor.html" tabindex="0" data-v-dc692963 data-v-9c663999><!--[--><span data-v-9c663999>Sponsor</span><!--]--></a><!--]--><!--[--><div class="VPFlyout VPNavBarMenuGroup" data-v-dc692963 data-v-b6c34ac9><button type="button" class="button" aria-haspopup="true" aria-expanded="false" data-v-b6c34ac9><span class="text" data-v-b6c34ac9><!----><span data-v-b6c34ac9>More</span><span class="vpi-chevron-down text-icon" data-v-b6c34ac9></span></span></button><div class="menu" data-v-b6c34ac9><div class="VPMenu" data-v-b6c34ac9 data-v-b98bc113><div class="items" data-v-b98bc113><!--[--><!--[--><div class="VPMenuLink" data-v-b98bc113 data-v-43f1e123><a class="VPLink link" href="/mind-map-docs/en/blog.html" data-v-43f1e123><!--[-->Blog<!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-b98bc113 data-v-43f1e123><a class="VPLink link vp-external-link-icon" href="https://github.com/wanglin2/lx-doc" target="_blank" rel="noreferrer" data-v-43f1e123><!--[-->Ideal Document<!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-b98bc113 data-v-43f1e123><a class="VPLink link vp-external-link-icon" href="https://github.com/wanglin2/mind-map/issues" target="_blank" rel="noreferrer" data-v-43f1e123><!--[-->Issues<!--]--></a></div><!--]--><!--]--></div><!--[--><!--]--></div></div></div><!--]--><!--]--></nav><div class="VPFlyout VPNavBarTranslations translations" data-v-6aa21345 data-v-88af2de4 data-v-b6c34ac9><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="Change language" data-v-b6c34ac9><span class="text" data-v-b6c34ac9><span class="vpi-languages option-icon" data-v-b6c34ac9></span><!----><span class="vpi-chevron-down text-icon" data-v-b6c34ac9></span></span></button><div class="menu" data-v-b6c34ac9><div class="VPMenu" data-v-b6c34ac9 data-v-b98bc113><!----><!--[--><!--[--><div class="items" data-v-88af2de4><p class="title" data-v-88af2de4>English</p><!--[--><div class="VPMenuLink" data-v-88af2de4 data-v-43f1e123><a class="VPLink link" href="/mind-map-docs/api/utils.html" data-v-43f1e123><!--[-->中文<!--]--></a></div><!--]--></div><!--]--><!--]--></div></div></div><div class="VPNavBarAppearance appearance" data-v-6aa21345 data-v-6c893767><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="Switch to dark theme" aria-checked="false" data-v-6c893767 data-v-5337faa4 data-v-1d5665e3><span class="check" data-v-1d5665e3><span class="icon" data-v-1d5665e3><!--[--><span class="vpi-sun sun" data-v-5337faa4></span><span class="vpi-moon moon" data-v-5337faa4></span><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-6aa21345 data-v-0394ad82 data-v-7bc22406><!--[--><a class="VPSocialLink no-icon" href="https://github.com/wanglin2/mind-map" aria-label="github" target="_blank" rel="noopener" data-v-7bc22406 data-v-eee4e7cb><span class="vpi-social-github" /></a><!--]--></div><div class="VPFlyout VPNavBarExtra extra" data-v-6aa21345 data-v-bb2aa2f0 data-v-b6c34ac9><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-b6c34ac9><span class="vpi-more-horizontal icon" data-v-b6c34ac9></span></button><div class="menu" data-v-b6c34ac9><div class="VPMenu" data-v-b6c34ac9 data-v-b98bc113><!----><!--[--><!--[--><div class="group translations" data-v-bb2aa2f0><p class="trans-title" data-v-bb2aa2f0>English</p><!--[--><div class="VPMenuLink" data-v-bb2aa2f0 data-v-43f1e123><a class="VPLink link" href="/mind-map-docs/api/utils.html" data-v-43f1e123><!--[-->中文<!--]--></a></div><!--]--></div><div class="group" data-v-bb2aa2f0><div class="item appearance" data-v-bb2aa2f0><p class="label" data-v-bb2aa2f0>Dark mode</p><div class="appearance-action" data-v-bb2aa2f0><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="Switch to dark theme" aria-checked="false" data-v-bb2aa2f0 data-v-5337faa4 data-v-1d5665e3><span class="check" data-v-1d5665e3><span class="icon" data-v-1d5665e3><!--[--><span class="vpi-sun sun" data-v-5337faa4></span><span class="vpi-moon moon" data-v-5337faa4></span><!--]--></span></span></button></div></div></div><div class="group" data-v-bb2aa2f0><div class="item social-links" data-v-bb2aa2f0><div class="VPSocialLinks social-links-list" data-v-bb2aa2f0 data-v-7bc22406><!--[--><a class="VPSocialLink no-icon" href="https://github.com/wanglin2/mind-map" aria-label="github" target="_blank" rel="noopener" data-v-7bc22406 data-v-eee4e7cb><span class="vpi-social-github" /></a><!--]--></div></div></div><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-6aa21345 data-v-e5dd9c1c><span class="container" data-v-e5dd9c1c><span class="top" data-v-e5dd9c1c></span><span class="middle" data-v-e5dd9c1c></span><span class="bottom" data-v-e5dd9c1c></span></span></button></div></div></div></div><div class="divider" data-v-6aa21345><div class="divider-line" data-v-6aa21345></div></div></div><!----></header><div class="VPLocalNav has-sidebar empty" data-v-5d98c3a5 data-v-a6f0e41e><div class="container" data-v-a6f0e41e><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-a6f0e41e><span class="vpi-align-left menu-icon" data-v-a6f0e41e></span><span class="menu-text" data-v-a6f0e41e>Menu</span></button><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-a6f0e41e data-v-17a5e62e><button data-v-17a5e62e>Return to top</button><!----></div></div></div><aside class="VPSidebar" data-v-5d98c3a5 data-v-319d5ca6><div class="curtain" data-v-319d5ca6></div><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-319d5ca6><span class="visually-hidden" id="sidebar-aria-label" data-v-319d5ca6> Sidebar Navigation </span><!--[--><!--]--><!--[--><div class="no-transition group" data-v-c40bc020><section class="VPSidebarItem level-0 has-active" data-v-c40bc020 data-v-b7550ba0><div class="item" role="button" tabindex="0" data-v-b7550ba0><div class="indicator" data-v-b7550ba0></div><h2 class="text" data-v-b7550ba0>API</h2><!----></div><div class="items" data-v-b7550ba0><!--[--><section class="VPSidebarItem level-1" data-v-b7550ba0 data-v-b7550ba0><div class="item" role="button" tabindex="0" data-v-b7550ba0><div class="indicator" data-v-b7550ba0></div><h3 class="text" data-v-b7550ba0>Constructor</h3><!----></div><div class="items" data-v-b7550ba0><!--[--><div class="VPSidebarItem level-2 is-link" data-v-b7550ba0 data-v-b7550ba0><div class="item" data-v-b7550ba0><div class="indicator" data-v-b7550ba0></div><a class="VPLink link link" href="/mind-map-docs/en/api/constructor/constructor-options.html" data-v-b7550ba0><!--[--><p class="text" data-v-b7550ba0>Options</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-b7550ba0 data-v-b7550ba0><div class="item" data-v-b7550ba0><div class="indicator" data-v-b7550ba0></div><a class="VPLink link link" href="/mind-map-docs/en/api/constructor/constructor-props.html" data-v-b7550ba0><!--[--><p class="text" data-v-b7550ba0>Props</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-b7550ba0 data-v-b7550ba0><div class="item" data-v-b7550ba0><div class="indicator" data-v-b7550ba0></div><a class="VPLink link link" href="/mind-map-docs/en/api/constructor/constructor-methods.html" data-v-b7550ba0><!--[--><p class="text" data-v-b7550ba0>Methods</p><!--]--></a><!----></div><!----></div><!--]--></div></section><div class="VPSidebarItem level-1 is-link" data-v-b7550ba0 data-v-b7550ba0><div class="item" data-v-b7550ba0><div class="indicator" data-v-b7550ba0></div><a class="VPLink link link" href="/mind-map-docs/en/api/node.html" data-v-b7550ba0><!--[--><p class="text" data-v-b7550ba0>Node class</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b7550ba0 data-v-b7550ba0><div class="item" data-v-b7550ba0><div class="indicator" data-v-b7550ba0></div><a class="VPLink link link" href="/mind-map-docs/en/api/render.html" data-v-b7550ba0><!--[--><p class="text" data-v-b7550ba0>Render clas</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b7550ba0 data-v-b7550ba0><div class="item" data-v-b7550ba0><div class="indicator" data-v-b7550ba0></div><a class="VPLink link link" href="/mind-map-docs/en/api/command.html" data-v-b7550ba0><!--[--><p class="text" data-v-b7550ba0>Command clas</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b7550ba0 data-v-b7550ba0><div class="item" data-v-b7550ba0><div class="indicator" data-v-b7550ba0></div><a class="VPLink link link" href="/mind-map-docs/en/api/textEdit.html" data-v-b7550ba0><!--[--><p class="text" data-v-b7550ba0>TextEdit clas</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b7550ba0 data-v-b7550ba0><div class="item" data-v-b7550ba0><div class="indicator" data-v-b7550ba0></div><a class="VPLink link link" href="/mind-map-docs/en/api/view.html" data-v-b7550ba0><!--[--><p class="text" data-v-b7550ba0>View clas</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b7550ba0 data-v-b7550ba0><div class="item" data-v-b7550ba0><div class="indicator" data-v-b7550ba0></div><a class="VPLink link link" href="/mind-map-docs/en/api/keyCommand.html" data-v-b7550ba0><!--[--><p class="text" data-v-b7550ba0>KeyCommand clas</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b7550ba0 data-v-b7550ba0><div class="item" data-v-b7550ba0><div class="indicator" data-v-b7550ba0></div><a class="VPLink link link" href="/mind-map-docs/en/api/batchExecution.html" data-v-b7550ba0><!--[--><p class="text" data-v-b7550ba0>BatchExecution clas</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b7550ba0 data-v-b7550ba0><div class="item" data-v-b7550ba0><div class="indicator" data-v-b7550ba0></div><a class="VPLink link link" href="/mind-map-docs/en/api/xmind.html" data-v-b7550ba0><!--[--><p class="text" data-v-b7550ba0>XMind parse</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b7550ba0 data-v-b7550ba0><div class="item" data-v-b7550ba0><div class="indicator" data-v-b7550ba0></div><a class="VPLink link link" href="/mind-map-docs/en/api/markdown.html" data-v-b7550ba0><!--[--><p class="text" data-v-b7550ba0>Markdown parse</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b7550ba0 data-v-b7550ba0><div class="item" data-v-b7550ba0><div class="indicator" data-v-b7550ba0></div><a class="VPLink link link" href="/mind-map-docs/en/api/utils.html" data-v-b7550ba0><!--[--><p class="text" data-v-b7550ba0>Utility methods</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><!--]--><!--[--><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-5d98c3a5 data-v-1428d186><div class="VPDoc has-sidebar has-aside" data-v-1428d186 data-v-39a288b8><!--[--><!--]--><div class="container" data-v-39a288b8><div class="aside" data-v-39a288b8><div class="aside-curtain" data-v-39a288b8></div><div class="aside-container" data-v-39a288b8><div class="aside-content" data-v-39a288b8><div class="VPDocAside" data-v-39a288b8 data-v-3f215769><!--[--><!--]--><!--[--><!--]--><nav aria-labelledby="doc-outline-aria-label" class="VPDocAsideOutline" data-v-3f215769 data-v-a5bbad30><div class="content" data-v-a5bbad30><div class="outline-marker" data-v-a5bbad30></div><div aria-level="2" class="outline-title" id="doc-outline-aria-label" role="heading" data-v-a5bbad30>Outline</div><ul class="VPDocOutlineItem root" data-v-a5bbad30 data-v-b933a997><!--[--><!--]--></ul></div></nav><!--[--><!--]--><div class="spacer" data-v-3f215769></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-39a288b8><div class="content-container" data-v-39a288b8><!--[--><!--]--><main class="main" data-v-39a288b8><div style="position:relative;" class="vp-doc _mind-map-docs_en_api_utils" data-v-39a288b8><div><h1 id="utility-methods" tabindex="-1">Utility Methods <a class="header-anchor" href="#utility-methods" aria-label="Permalink to &quot;Utility Methods&quot;">​</a></h1><h2 id="base-utility-methods" tabindex="-1">Base utility Methods <a class="header-anchor" href="#base-utility-methods" aria-label="Permalink to &quot;Base utility Methods&quot;">​</a></h2><p>Reference:</p><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {walk, ...} </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;simple-mind-map/src/utils&#39;</span></span></code></pre></div><h3 id="methods" tabindex="-1">Methods <a class="header-anchor" href="#methods" aria-label="Permalink to &quot;Methods&quot;">​</a></h3><h4 id="resizeimgsizebyoriginratio-width-height-newwidth-newheight" tabindex="-1">resizeImgSizeByOriginRatio(width, height, newWidth, newHeight) <a class="header-anchor" href="#resizeimgsizebyoriginratio-width-height-newwidth-newheight" aria-label="Permalink to &quot;resizeImgSizeByOriginRatio(width, height, newWidth, newHeight)&quot;">​</a></h4><blockquote><p>v0.6.5+</p></blockquote><p><code>width</code>: The original width of the image</p><p><code>height</code>：The original height of the image</p><p><code>newWidth</code>：Width to zoom in to</p><p><code>newHeight</code>：Height to zoom in to</p><p>Scale the image proportionally. Zoom to the specified size of <code>newWidth</code> and <code>newHeight</code> while maintaining the original aspect ratio of the image.</p><h4 id="walk-root-parent-beforecallback-aftercallback-isroot-layerindex-0-index-0-ancestors" tabindex="-1">walk(root, parent, beforeCallback, afterCallback, isRoot, layerIndex = 0, index = 0, ancestors = []) <a class="header-anchor" href="#walk-root-parent-beforecallback-aftercallback-isroot-layerindex-0-index-0-ancestors" aria-label="Permalink to &quot;walk(root, parent, beforeCallback, afterCallback, isRoot, layerIndex = 0, index = 0, ancestors = [])&quot;">​</a></h4><p>Depth-first traversal of a tree</p><p><code>root</code>: the root node of the tree to be traversed</p><p><code>parent</code>: parent node</p><p><code>beforeCallback</code>: preorder traversal callback function, callback parameters are: root, parent, isRoot, layerIndex, index, ancestors</p><p><code>afterCallback</code>: postorder traversal callback function, callback parameters are: root, parent, isRoot, layerIndex, index, ancestors</p><p><code>isRoot</code>: whether it is the root node</p><p><code>layerIndex</code>: node level</p><p><code>index</code>: index of the node among its siblings</p><p><code>ancestors</code>：v0.10.6+, List of all ancestor nodes of the current node</p><p>Example:</p><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">walk</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(tree, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, () </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {}, () </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {}, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><h4 id="bfswalk-root-callback" tabindex="-1">bfsWalk(root, callback) <a class="header-anchor" href="#bfswalk-root-callback" aria-label="Permalink to &quot;bfsWalk(root, callback)&quot;">​</a></h4><p>Breadth-first traversal of a tree</p><h4 id="resizeimgsize-width-height-maxwidth-maxheight" tabindex="-1">resizeImgSize(width, height, maxWidth, maxHeight) <a class="header-anchor" href="#resizeimgsize-width-height-maxwidth-maxheight" aria-label="Permalink to &quot;resizeImgSize(width, height, maxWidth, maxHeight)&quot;">​</a></h4><p>Resize image size</p><p><code>width</code>: original width of the image</p><p><code>height</code>: original height of the image</p><p><code>maxWidth</code>: the width to resize to</p><p><code>maxHeight</code>: the height to resize to</p><p><code>maxWidth</code> and <code>maxHeight</code> can both be passed, or only one of them can be passed</p><h4 id="resizeimg-imgurl-maxwidth-maxheight" tabindex="-1">resizeImg(imgUrl, maxWidth, maxHeight) <a class="header-anchor" href="#resizeimg-imgurl-maxwidth-maxheight" aria-label="Permalink to &quot;resizeImg(imgUrl, maxWidth, maxHeight)&quot;">​</a></h4><p>Resize image, internally loads the image first, then calls the <code>resizeImgSize</code> method, and returns a <code>promise</code></p><h4 id="simpledeepclone-data" tabindex="-1">simpleDeepClone(data) <a class="header-anchor" href="#simpledeepclone-data" aria-label="Permalink to &quot;simpleDeepClone(data)&quot;">​</a></h4><p>Extremely simple deep copy method, can only be used for objects that are all basic data, otherwise it will throw an error</p><h4 id="copyrendertree-tree-root" tabindex="-1">copyRenderTree(tree, root) <a class="header-anchor" href="#copyrendertree-tree-root" aria-label="Permalink to &quot;copyRenderTree(tree, root)&quot;">​</a></h4><p>Copy render tree data, example:</p><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">copyRenderTree</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({}, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">this</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.mindMap.renderer.renderTree);</span></span></code></pre></div><h4 id="copynodetree-tree-root-removeactivestate-keepid" tabindex="-1">copyNodeTree(tree, root, removeActiveState, keepId) <a class="header-anchor" href="#copynodetree-tree-root-removeactivestate-keepid" aria-label="Permalink to &quot;copyNodeTree(tree, root, removeActiveState, keepId)&quot;">​</a></h4><ul><li><p><code>removeActiveState</code>: <code>Boolean</code>, default is <code>false</code>, Whether to remove the active state of the node</p></li><li><p><code>removeId</code>：v0.7.3-fix.1+, Is remove the uid from the node data, default is <code>true</code></p></li></ul><blockquote><ul><li><code>keepId</code>: (Original fourth parameter) v0.4.6+, <code>Boolean</code>, default is <code>false</code>, Whether to retain the <code>id</code> of the replicated node will be deleted by default to prevent duplicate node <code>id</code>. However, for mobile node scenarios, the original <code>id</code> of the node needs to be retained</li></ul></blockquote><p>Copy node tree data, mainly eliminating the reference <code>node</code> instance <code>_node</code> and copying the <code>data</code> of the data object, example:</p><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">copyNodeTree</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({}, node);</span></span></code></pre></div><h4 id="imgtodataurl-src-returnblob-false" tabindex="-1">imgToDataUrl(src, returnBlob = false) <a class="header-anchor" href="#imgtodataurl-src-returnblob-false" aria-label="Permalink to &quot;imgToDataUrl(src, returnBlob = false)&quot;">​</a></h4><ul><li><p><code>src</code>：Image url</p></li><li><p><code>returnBlob</code>：v0.10.2+，Is the result returned in Blob format, defaulting to DataURL format</p></li></ul><p>Convert image to dataURL</p><h4 id="downloadfile-file-filename" tabindex="-1">downloadFile(file, fileName) <a class="header-anchor" href="#downloadfile-file-filename" aria-label="Permalink to &quot;downloadFile(file, fileName)&quot;">​</a></h4><p>Download file</p><h4 id="throttle-fn-time-300-ctx" tabindex="-1">throttle(fn, time = 300, ctx) <a class="header-anchor" href="#throttle-fn-time-300-ctx" aria-label="Permalink to &quot;throttle(fn, time = 300, ctx)&quot;">​</a></h4><p>Throttle function</p><h4 id="asyncrun-tasklist-callback" tabindex="-1">asyncRun(taskList, callback = () =&gt; {}) <a class="header-anchor" href="#asyncrun-tasklist-callback" aria-label="Permalink to &quot;asyncRun(taskList, callback = () =&gt; {})&quot;">​</a></h4><p>Run tasks in task list asynchronously, tasks are run synchronously without order</p><h4 id="degtorad-deg" tabindex="-1">degToRad(deg) <a class="header-anchor" href="#degtorad-deg" aria-label="Permalink to &quot;degToRad(deg)&quot;">​</a></h4><blockquote><p>v0.2.24+</p></blockquote><p>Angle to radian</p><h4 id="camelcasetohyphen-str" tabindex="-1">camelCaseToHyphen(str) <a class="header-anchor" href="#camelcasetohyphen-str" aria-label="Permalink to &quot;camelCaseToHyphen(str)&quot;">​</a></h4><blockquote><p>v0.2.24+</p></blockquote><p>CamelCase to hyphen</p><h4 id="joinfontstr-italic-bold-fontsize-fontfamily" tabindex="-1">joinFontStr({ italic, bold, fontSize, fontFamily }) <a class="header-anchor" href="#joinfontstr-italic-bold-fontsize-fontfamily" aria-label="Permalink to &quot;joinFontStr({ italic, bold, fontSize, fontFamily })&quot;">​</a></h4><blockquote><p>v0.3.4+</p></blockquote><p>Join the <code>font</code> attribute value of the <code>css</code> font</p><h4 id="measuretext-text-italic-bold-fontsize-fontfamily" tabindex="-1">measureText(text, { italic, bold, fontSize, fontFamily }) <a class="header-anchor" href="#measuretext-text-italic-bold-fontsize-fontfamily" aria-label="Permalink to &quot;measureText(text, { italic, bold, fontSize, fontFamily })&quot;">​</a></h4><blockquote><p>v0.3.4+</p></blockquote><p>Measure the width and height of the text, return value:</p><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{ width, height }</span></span></code></pre></div><h4 id="gettextfromhtml-html" tabindex="-1">getTextFromHtml(html) <a class="header-anchor" href="#gettextfromhtml-html" aria-label="Permalink to &quot;getTextFromHtml(html)&quot;">​</a></h4><p>Extract plain text content from an HTML string.</p><h4 id="readblob-blob" tabindex="-1">readBlob(blob) <a class="header-anchor" href="#readblob-blob" aria-label="Permalink to &quot;readBlob(blob)&quot;">​</a></h4><blockquote><p>v0.5.9+</p></blockquote><p>Convert <code>blob</code> data to <code>data:url</code> data.</p><h4 id="parsedataurl-data" tabindex="-1">parseDataUrl(data) <a class="header-anchor" href="#parsedataurl-data" aria-label="Permalink to &quot;parseDataUrl(data)&quot;">​</a></h4><blockquote><p>v0.6.6+</p></blockquote><p>Parse <code>data:url</code> data, return:</p><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  type,</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// file type of data</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  base64</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// base64 data</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h4 id="getimagesize-src" tabindex="-1">getImageSize(src) <a class="header-anchor" href="#getimagesize-src" aria-label="Permalink to &quot;getImageSize(src)&quot;">​</a></h4><blockquote><p>v0.6.6+</p></blockquote><ul><li><code>src</code>: The url of img</li></ul><p>Get the size of image, return:</p><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  width,</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  height</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h4 id="loadimage-imgfile" tabindex="-1">loadImage(imgFile) <a class="header-anchor" href="#loadimage-imgfile" aria-label="Permalink to &quot;loadImage(imgFile)&quot;">​</a></h4><blockquote><p>v0.6.8+</p></blockquote><ul><li><code>imgFile</code>: File object of image type</li></ul><p>Load image, return:</p><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  url,</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// DataUrl</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  size</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// { width, height } width and height of image</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h4 id="gettype-data" tabindex="-1">getType(data) <a class="header-anchor" href="#gettype-data" aria-label="Permalink to &quot;getType(data)&quot;">​</a></h4><blockquote><p>v0.6.9+</p></blockquote><p>Get the type of a data, such as <code>Boolean</code>、<code>Array</code>.</p><h4 id="removehtmlstyle-html" tabindex="-1">removeHtmlStyle(html) <a class="header-anchor" href="#removehtmlstyle-html" aria-label="Permalink to &quot;removeHtmlStyle(html)&quot;">​</a></h4><blockquote><p>v0.6.10+</p></blockquote><p>Remove the inline style of nodes in the HTML string.</p><h4 id="addhtmlstyle-html-tag-style" tabindex="-1">addHtmlStyle(html, tag, style) <a class="header-anchor" href="#addhtmlstyle-html-tag-style" aria-label="Permalink to &quot;addHtmlStyle(html, tag, style)&quot;">​</a></h4><blockquote><p>v0.6.10+</p></blockquote><p>Add inline styles to the specified tags in the HTML tag.</p><h4 id="checkisrichtext-str" tabindex="-1">checkIsRichText(str) <a class="header-anchor" href="#checkisrichtext-str" aria-label="Permalink to &quot;checkIsRichText(str)&quot;">​</a></h4><blockquote><p>v0.6.10+</p></blockquote><p>Check if a string is a rich text character.</p><h4 id="iswhite-color" tabindex="-1">isWhite(color) <a class="header-anchor" href="#iswhite-color" aria-label="Permalink to &quot;isWhite(color)&quot;">​</a></h4><blockquote><p>v0.6.11+</p></blockquote><p>Determine whether a color is white.</p><h4 id="istransparent-color" tabindex="-1">isTransparent(color) <a class="header-anchor" href="#istransparent-color" aria-label="Permalink to &quot;isTransparent(color)&quot;">​</a></h4><blockquote><p>v0.6.11+</p></blockquote><p>Determine whether a color is transparent.</p><h4 id="noderichtexttotextwithwrap-html" tabindex="-1">nodeRichTextToTextWithWrap(html) <a class="header-anchor" href="#noderichtexttotextwithwrap-html" aria-label="Permalink to &quot;nodeRichTextToTextWithWrap(html)&quot;">​</a></h4><blockquote><p>v0.6.12+</p></blockquote><p>Convert the rich text content of nodes in the form of <code>&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;p&gt;</code> into text wrapped in <code>\n</code>.</p><h4 id="texttonoderichtextwithwrap-html" tabindex="-1">textToNodeRichTextWithWrap(html) <a class="header-anchor" href="#texttonoderichtextwithwrap-html" aria-label="Permalink to &quot;textToNodeRichTextWithWrap(html)&quot;">​</a></h4><blockquote><p>v0.6.12+</p></blockquote><p>Convert the wrapped text of <code>&lt;br&gt;</code> into node rich text content in the form of <code>&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;p&gt;</code>.</p><h4 id="ismobile" tabindex="-1">isMobile() <a class="header-anchor" href="#ismobile" aria-label="Permalink to &quot;isMobile()&quot;">​</a></h4><blockquote><p>v0.6.13+</p></blockquote><p>Determine if it is a mobile environment.</p><h4 id="gettopancestorsfomnodelist-list" tabindex="-1">getTopAncestorsFomNodeList(list) <a class="header-anchor" href="#gettopancestorsfomnodelist-list" aria-label="Permalink to &quot;getTopAncestorsFomNodeList(list)&quot;">​</a></h4><blockquote><p>v0.7.2+</p></blockquote><ul><li><code>list</code>: Arrray, Node instance list.</li></ul><p>Find the top-level node list from the node instance list.</p><h4 id="checktworectisoverlap-minx1-maxx1-miny1-maxy1-minx2-maxx2-miny2-maxy2" tabindex="-1">checkTwoRectIsOverlap(minx1, maxx1, miny1, maxy1, minx2, maxx2, miny2, maxy2) <a class="header-anchor" href="#checktworectisoverlap-minx1-maxx1-miny1-maxy1-minx2-maxx2-miny2-maxy2" aria-label="Permalink to &quot;checkTwoRectIsOverlap(minx1, maxx1, miny1, maxy1, minx2, maxx2, miny2, maxy2)&quot;">​</a></h4><blockquote><p>v0.7.2+</p></blockquote><p>The parameter is the position of two rectangles.</p><p>Determine if two rectangles overlap.</p><h4 id="focusinput-el" tabindex="-1">focusInput(el) <a class="header-anchor" href="#focusinput-el" aria-label="Permalink to &quot;focusInput(el)&quot;">​</a></h4><blockquote><p>v0.7.2+</p></blockquote><ul><li><code>el</code>: DOM nodes, elements that can be focused, typically input box elements.</li></ul><p>Focus on the specified input box.</p><h4 id="selectallinput-el" tabindex="-1">selectAllInput(el) <a class="header-anchor" href="#selectallinput-el" aria-label="Permalink to &quot;selectAllInput(el)&quot;">​</a></h4><blockquote><p>v0.7.2+</p></blockquote><ul><li><code>el</code>: DOM nodes, elements that can be focused, typically input box elements.</li></ul><p>Focus and select all specified input boxes.</p><h4 id="adddatatoappointnodes-appointnodes-data" tabindex="-1">addDataToAppointNodes(appointNodes, data = {}) <a class="header-anchor" href="#adddatatoappointnodes-appointnodes-data" aria-label="Permalink to &quot;addDataToAppointNodes(appointNodes, data = {})&quot;">​</a></h4><blockquote><p>v0.7.2+</p></blockquote><ul><li><p><code>appointNodes</code>：Node instance list, array type.</p></li><li><p><code>data</code>：The data to be attached to all nodes in the specified node instance list tree.</p></li></ul><p>Adding additional data to the specified node list tree data will modify the original data.</p><h4 id="createuidforappointnodes-appointnodes-createnewid-handle" tabindex="-1">createUidForAppointNodes(appointNodes, createNewId, handle) <a class="header-anchor" href="#createuidforappointnodes-appointnodes-createnewid-handle" aria-label="Permalink to &quot;createUidForAppointNodes(appointNodes, createNewId, handle)&quot;">​</a></h4><blockquote><p>v0.7.2+</p></blockquote><ul><li><p><code>appointNodes</code>：Node instance list, array type.</p></li><li><p><code>createNewId</code>：v0.7.3-fix.1+, <code>Boolean</code>, default is <code>false</code>, If the node does not have a &#39;uid&#39;, a new &#39;uid&#39; will be created. If &#39;true&#39; is passed, a new &#39;uid&#39; will be created regardless of whether the node data originally exists or not`</p></li><li><p><code>handle</code>：v0.10.5+, <code>null、Function</code>, default is <code>null</code>, You can pass a function that will be called when traversing each node, with the callback parameter being the current node being traversed.</p></li></ul><p>Adding a uid to the specified node list tree data (if the uid does not exist) will modify the original data.</p><h4 id="getnodeindex-node" tabindex="-1">getNodeIndex(node) <a class="header-anchor" href="#getnodeindex-node" aria-label="Permalink to &quot;getNodeIndex(node)&quot;">​</a></h4><blockquote><p>v0.7.2+</p></blockquote><ul><li><code>node</code>：Node instance.</li></ul><p>Gets the position index of a node within its peers.</p><h4 id="mergericonlist-list" tabindex="-1">mergerIconList(list) <a class="header-anchor" href="#mergericonlist-list" aria-label="Permalink to &quot;mergerIconList(list)&quot;">​</a></h4><blockquote><p>v0.7.2+</p></blockquote><ul><li><code>list</code>：The array of node icons to be merged into the library.</li></ul><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// const data = [</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//   { type: &#39;priority&#39;, name: &#39;优先级图标&#39;, list: [{ name: &#39;1&#39;, icon: &#39;a&#39; }, { name: 2, icon: &#39;b&#39; }] },</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//   { type: &#39;priority&#39;, name: &#39;优先级图标&#39;, list: [{ name: &#39;2&#39;, icon: &#39;c&#39; }, { name: 3, icon: &#39;d&#39; }] },</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// ];</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// mergerIconList(data)  result:</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// [</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//   { type: &#39;priority&#39;, name: &#39;优先级图标&#39;, list: [{ name: &#39;1&#39;, icon: &#39;a&#39; }, { name: 2, icon: &#39;c&#39; }, { name: 3, icon: &#39;d&#39; }] },</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// ]</span></span></code></pre></div><p>Merge icon arrays.</p><h4 id="htmlescape-str" tabindex="-1">htmlEscape(str) <a class="header-anchor" href="#htmlescape-str" aria-label="Permalink to &quot;htmlEscape(str)&quot;">​</a></h4><blockquote><p>v0.7.2+</p></blockquote><ul><li><code>str</code>：String.</li></ul><p>Escape the incoming string, currently escaping the following three characters:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>&amp; -&gt; &amp;amp;</span></span>
<span class="line"><span>&lt; -&gt; &amp;lt;</span></span>
<span class="line"><span>&gt; -&gt; &amp;gt;</span></span></code></pre></div><h4 id="generatecolorbycontent-str" tabindex="-1">generateColorByContent(str) <a class="header-anchor" href="#generatecolorbycontent-str" aria-label="Permalink to &quot;generateColorByContent(str)&quot;">​</a></h4><blockquote><p>v0.7.2+</p></blockquote><ul><li><code>str</code>：String.</li></ul><p>Generate colors based on incoming content, and the same content will generate the same color.</p><h4 id="issameobject-a-b" tabindex="-1">isSameObject(a, b) <a class="header-anchor" href="#issameobject-a-b" aria-label="Permalink to &quot;isSameObject(a, b)&quot;">​</a></h4><blockquote><p>v0.7.3+</p></blockquote><ul><li><code>a</code>、<code>b</code>: Object | Array, Two objects to compare</li></ul><p>Determine whether two objects are the same, only handling objects or arrays.</p><h4 id="getnodedataindex-node" tabindex="-1">getNodeDataIndex(node) <a class="header-anchor" href="#getnodedataindex-node" aria-label="Permalink to &quot;getNodeDataIndex(node)&quot;">​</a></h4><blockquote><p>v0.8.0+</p></blockquote><p>Gets the position index of a node within its sibling nodes.</p><h4 id="getnodeindexinnodelist-node-nodelist" tabindex="-1">getNodeIndexInNodeList(node, nodeList) <a class="header-anchor" href="#getnodeindexinnodelist-node-nodelist" aria-label="Permalink to &quot;getNodeIndexInNodeList(node, nodeList)&quot;">​</a></h4><blockquote><p>v0.8.0+</p></blockquote><p>Find the index of a node from a list of nodes.</p><h4 id="setdatatoclipboard-data" tabindex="-1">setDataToClipboard(data) <a class="header-anchor" href="#setdatatoclipboard-data" aria-label="Permalink to &quot;setDataToClipboard(data)&quot;">​</a></h4><blockquote><p>v0.8.0+</p></blockquote><ul><li><code>data</code>：Object | Array</li></ul><p>Set data to the user clipboard.</p><h4 id="getdatafromclipboard" tabindex="-1">getDataFromClipboard() <a class="header-anchor" href="#getdatafromclipboard" aria-label="Permalink to &quot;getDataFromClipboard()&quot;">​</a></h4><blockquote><p>v0.8.0+</p></blockquote><p>Reading text and images from the user&#39;s clipboard returns:</p><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  text,</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  img</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h4 id="removefromparentnodedata-node" tabindex="-1">removeFromParentNodeData(node) <a class="header-anchor" href="#removefromparentnodedata-node" aria-label="Permalink to &quot;removeFromParentNodeData(node)&quot;">​</a></h4><blockquote><p>v0.8.0+</p></blockquote><p>Remove the data of a node from its parent node&#39;s <code>nodeData.children</code> list.</p><h4 id="checkhassupsubrelation" tabindex="-1">checkHasSupSubRelation() <a class="header-anchor" href="#checkhassupsubrelation" aria-label="Permalink to &quot;checkHasSupSubRelation()&quot;">​</a></h4><blockquote><p>v0.8.1+</p></blockquote><p>Determine whether there is a hierarchical relationship from the given node instance list.</p><h4 id="handleselfclosetags-str" tabindex="-1">handleSelfCloseTags(str) <a class="header-anchor" href="#handleselfclosetags-str" aria-label="Permalink to &quot;handleSelfCloseTags(str)&quot;">​</a></h4><blockquote><p>v0.9.1+</p></blockquote><ul><li><code>str</code>: html string</li></ul><p>Add a closed state to HTML self closing tags, <code>&lt;div&gt;&lt;img src=&quot;xxx&quot;&gt;&lt;/div&gt;</code> -&gt; <code>&lt;div&gt;&lt;img src=&quot;xxx&quot; /&gt;&lt;/div&gt;</code>。</p><h4 id="checknodelistisequal-list1-list2" tabindex="-1">checkNodeListIsEqual(list1, list2) <a class="header-anchor" href="#checknodelistisequal-list1-list2" aria-label="Permalink to &quot;checkNodeListIsEqual(list1, list2)&quot;">​</a></h4><blockquote><p>v0.9.1+</p></blockquote><ul><li><code>list1/list2</code>: Node instance list</li></ul><p>Check if the two node instance lists contain the same nodes.</p><h4 id="getchromeversion" tabindex="-1">getChromeVersion() <a class="header-anchor" href="#getchromeversion" aria-label="Permalink to &quot;getChromeVersion()&quot;">​</a></h4><blockquote><p>v0.9.3+</p></blockquote><p>Get the current version of the Chrome kernel used by the browser. If the current browser is not using the &#39;Chrome&#39; kernel, an empty string will be returned.</p><h4 id="transformtreedatatoobject-data" tabindex="-1">transformTreeDataToObject(data) <a class="header-anchor" href="#transformtreedatatoobject-data" aria-label="Permalink to &quot;transformTreeDataToObject(data)&quot;">​</a></h4><blockquote><p>v0.9.3+</p></blockquote><ul><li><code>data</code>：Mind map node data.</li></ul><p>Convert the mind map tree structure to a level object.</p><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">        data</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">            uid</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;xxx&#39;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        },</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">        children</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">            {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                data: {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                    uid: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;xxx&#39;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                },</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                children: []</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">            }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        ]</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">    }</span></span></code></pre></div><p>Convert to:</p><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">    {</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">        uid</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">            children</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [uid1, uid2],</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">            data</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {}</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">    }</span></span></code></pre></div><h4 id="transformobjecttotreedata-data" tabindex="-1">transformObjectToTreeData(data) <a class="header-anchor" href="#transformobjecttotreedata-data" aria-label="Permalink to &quot;transformObjectToTreeData(data)&quot;">​</a></h4><blockquote><p>v0.9.3+</p></blockquote><p>Convert flat objects into a tree structure. Reverse operation of the transformTreeDataToObject method.</p><h4 id="removehtmlnodebyclass-html-selector" tabindex="-1">removeHtmlNodeByClass(html, selector) <a class="header-anchor" href="#removehtmlnodebyclass-html-selector" aria-label="Permalink to &quot;removeHtmlNodeByClass(html, selector)&quot;">​</a></h4><blockquote><p>v0.9.6+</p></blockquote><ul><li><p><code>html</code>：html string</p></li><li><p><code>selector</code>：Node selectors, such as class selectors and id selectors</p></li></ul><p>Remove the node of the specified selector from the specified HTML string, and then return the processed HTML string.</p><h4 id="getonfullscreenevt" tabindex="-1">getOnfullscreEnevt() <a class="header-anchor" href="#getonfullscreenevt" aria-label="Permalink to &quot;getOnfullscreEnevt()&quot;">​</a></h4><blockquote><p>v0.9.11+</p></blockquote><p>Detect full screen events available in the current browser. You can use it this way:</p><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> fullscrrenEvent</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getOnfullscreEnevt</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// Monitor full screen events</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">document.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">addEventListener</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(fullscrrenEvent, () </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">  // Determine whether the current state is full screen based on whether document.fullscreenElement is null</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">})</span></span></code></pre></div><h4 id="fullscreen-element" tabindex="-1">fullScreen(element) <a class="header-anchor" href="#fullscreen-element" aria-label="Permalink to &quot;fullScreen(element)&quot;">​</a></h4><blockquote><p>v0.9.11+</p></blockquote><p>Put the specified DOM element into full screen mode.</p><h4 id="exitfullscreen" tabindex="-1">exitFullScreen() <a class="header-anchor" href="#exitfullscreen" aria-label="Permalink to &quot;exitFullScreen()&quot;">​</a></h4><blockquote><p>v0.9.11+</p></blockquote><p>Exit full screen mode.</p><h4 id="defensexss-htmlstr" tabindex="-1">defenseXSS(htmlStr) <a class="header-anchor" href="#defensexss-htmlstr" aria-label="Permalink to &quot;defenseXSS(htmlStr)&quot;">​</a></h4><blockquote><p>v0.10.0+</p></blockquote><ul><li><code>htmlStr</code>：HTML strings that need to be filtered</li></ul><p>Return：Filtered HTML string</p><p>Defend against XSS attacks, filter malicious HTML tags and attributes. You can recursively traverse the tree data before passing the node data to SimpleMindMap, using this method to process the rich text content of nodes and avoid XSS attacks.</p><h2 id="simulate-css-background-in-canvas" tabindex="-1">Simulate CSS background in Canvas <a class="header-anchor" href="#simulate-css-background-in-canvas" aria-label="Permalink to &quot;Simulate CSS background in Canvas&quot;">​</a></h2><p>Import:</p><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> drawBackgroundImageToCanvas </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;simple-mind-map/src/utils/simulateCSSBackgroundInCanvas&#39;</span></span></code></pre></div><p>Usage：</p><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">let</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> width </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 500</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">let</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> height </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 500</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">let</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> img </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;/1.jpg&#39;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">let</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> canvas </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> document.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">createElement</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;canvas&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">canvas.width </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> width</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">canvas.height </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> height</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">drawBackgroundImageToCanvas</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(ctx, width, height, img, {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  backgroundRepeat: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;repeat-y&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  backgroundSize: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;60%&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  backgroundPosition: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;center center&#39;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}, (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">err</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">  if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (err) {</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">    // fail</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">else</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">    // success</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">})</span></span></code></pre></div><h2 id="lru-cache-class" tabindex="-1">LRU cache class <a class="header-anchor" href="#lru-cache-class" aria-label="Permalink to &quot;LRU cache class&quot;">​</a></h2><blockquote><p>v0.5.10+</p></blockquote><p>Import:</p><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Lru </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;simple-mind-map/src/utils/Lru.js&#39;</span></span></code></pre></div><h3 id="constructor" tabindex="-1">Constructor <a class="header-anchor" href="#constructor" aria-label="Permalink to &quot;Constructor&quot;">​</a></h3><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">let</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> lru </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> new</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Lru</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(max)</span></span></code></pre></div><p><code>max</code>: Specify the maximum number of caches.</p><h3 id="instance-properties" tabindex="-1">Instance properties <a class="header-anchor" href="#instance-properties" aria-label="Permalink to &quot;Instance properties&quot;">​</a></h3><h4 id="size" tabindex="-1">size <a class="header-anchor" href="#size" aria-label="Permalink to &quot;size&quot;">​</a></h4><p>The current number of caches.</p><h4 id="pool" tabindex="-1">pool <a class="header-anchor" href="#pool" aria-label="Permalink to &quot;pool&quot;">​</a></h4><p>Get cache pool.</p><h3 id="instance-methods" tabindex="-1">Instance methods <a class="header-anchor" href="#instance-methods" aria-label="Permalink to &quot;Instance methods&quot;">​</a></h3><h4 id="add-key-value" tabindex="-1">add(key, value) <a class="header-anchor" href="#add-key-value" aria-label="Permalink to &quot;add(key, value)&quot;">​</a></h4><p>Add cache.</p><h4 id="delete-key" tabindex="-1">delete(key) <a class="header-anchor" href="#delete-key" aria-label="Permalink to &quot;delete(key)&quot;">​</a></h4><p>Delete cache.</p><h4 id="has-key" tabindex="-1">has(key) <a class="header-anchor" href="#has-key" aria-label="Permalink to &quot;has(key)&quot;">​</a></h4><p>Check if a cache exists.</p><h4 id="get-key" tabindex="-1">get(key) <a class="header-anchor" href="#get-key" aria-label="Permalink to &quot;get(key)&quot;">​</a></h4><p>Gets the value of a cache.</p><blockquote><p>v0.9.2+</p></blockquote><p>Empty the cache pool.</p></div></div></main><footer class="VPDocFooter" data-v-39a288b8 data-v-e257564d><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-e257564d><span class="visually-hidden" id="doc-footer-aria-label" data-v-e257564d>Pager</span><div class="pager" data-v-e257564d><a class="VPLink link pager-link prev" href="/mind-map-docs/en/api/markdown.html" data-v-e257564d><!--[--><span class="desc" data-v-e257564d>Prev</span><span class="title" data-v-e257564d>Markdown parse</span><!--]--></a></div><div class="pager" data-v-e257564d><!----></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter has-sidebar" data-v-5d98c3a5 data-v-e315a0ad><div class="container" data-v-e315a0ad><p class="message" data-v-e315a0ad>MIT License.</p><p class="copyright" data-v-e315a0ad>Copyright © 2024-present mind-map team</p></div></footer><!--[--><!--]--></div></div>
    <script>window.__VP_HASH_MAP__=JSON.parse("{\"api_batchexecution.md\":\"CpL1COYr\",\"api_command.md\":\"CKB-R46V\",\"api_constructor_constructor-methods.md\":\"DsZDelzJ\",\"api_constructor_constructor-options.md\":\"8BBZ4ug7\",\"api_constructor_constructor-props.md\":\"D30kKm6b\",\"api_keycommand.md\":\"BJXgXO7R\",\"api_markdown.md\":\"CxqgUeiH\",\"api_node.md\":\"DhCkvc5p\",\"api_render.md\":\"DnyWiV1e\",\"api_textedit.md\":\"D9vZBSlW\",\"api_utils.md\":\"CW7ERQHD\",\"api_view.md\":\"BPCnCodU\",\"api_xmind.md\":\"BFFbvkZa\",\"blog.md\":\"BBj4F7hw\",\"client.md\":\"BgQFFUpL\",\"cloudstorage.md\":\"Do58UUNI\",\"course_course1.md\":\"DFK8EDkp\",\"course_course10.md\":\"4v-csSOz\",\"course_course11.md\":\"B9xEVvAJ\",\"course_course12.md\":\"DDIJIJPj\",\"course_course13.md\":\"5IBP-rao\",\"course_course14.md\":\"CC1fwQgh\",\"course_course15.md\":\"D5iYWEY8\",\"course_course16.md\":\"D0wQG2pw\",\"course_course17.md\":\"CJA6F6_y\",\"course_course18.md\":\"BH4yZs16\",\"course_course19.md\":\"UqRwkPwr\",\"course_course2.md\":\"B0W9BdDf\",\"course_course20.md\":\"BPg5uQc2\",\"course_course21.md\":\"CoLYAOVb\",\"course_course22.md\":\"CawwY_0h\",\"course_course23.md\":\"BocE6ttf\",\"course_course24.md\":\"DuSI03vb\",\"course_course25.md\":\"C9dnrwy7\",\"course_course26.md\":\"BkCJk6Hs\",\"course_course27.md\":\"L9aum18K\",\"course_course28.md\":\"DgOxC1eG\",\"course_course29.md\":\"C1QXQu6Q\",\"course_course3.md\":\"DfnuN21w\",\"course_course30.md\":\"B7H4qLQB\",\"course_course31.md\":\"cXaDZjGo\",\"course_course4.md\":\"6pgAw2LX\",\"course_course5.md\":\"ZP4Q9iiA\",\"course_course6.md\":\"C0fxBt7J\",\"course_course7.md\":\"Cuph-HFp\",\"course_course8.md\":\"ChoIxP8Z\",\"course_course9.md\":\"d4gQ06de\",\"en_api_batchexecution.md\":\"B6K-Ywh_\",\"en_api_command.md\":\"6BhEX64G\",\"en_api_constructor_constructor-methods.md\":\"Dc9Zw2sR\",\"en_api_constructor_constructor-options.md\":\"C82q4Cdk\",\"en_api_constructor_constructor-props.md\":\"8b47ZzdH\",\"en_api_keycommand.md\":\"PqfMHK2W\",\"en_api_markdown.md\":\"BSdO0S88\",\"en_api_node.md\":\"DwuEkWyP\",\"en_api_render.md\":\"CPakJa2d\",\"en_api_textedit.md\":\"Biai4Xq7\",\"en_api_utils.md\":\"C--N5wPv\",\"en_api_view.md\":\"DvZzXTZJ\",\"en_api_xmind.md\":\"CkYNjH7w\",\"en_blog.md\":\"Dt38_25W\",\"en_client.md\":\"JcBCndJr\",\"en_index.md\":\"1cVIsvnz\",\"en_plugins_about.md\":\"BUWGpGGx\",\"en_plugins_associativeline.md\":\"DQ7fnKYH\",\"en_plugins_checkbox.md\":\"kVZQRXcu\",\"en_plugins_cooperate.md\":\"D9rwtYWm\",\"en_plugins_demonstrate.md\":\"CVaF8Flk\",\"en_plugins_doexport.md\":\"1engnPn2\",\"en_plugins_drag.md\":\"Bj7U6mi5\",\"en_plugins_excel.md\":\"Bb_v4SjM\",\"en_plugins_formula.md\":\"Bn2eMOAc\",\"en_plugins_freemind.md\":\"DMclvg-J\",\"en_plugins_handdrawnlikestyle.md\":\"ixNqBFyB\",\"en_plugins_keyboardnavigation.md\":\"B9FIErI0\",\"en_plugins_minimap.md\":\"Ckq8cxpd\",\"en_plugins_nodeimgadjust.md\":\"BN6ddm5D\",\"en_plugins_notation.md\":\"C2O7-yEU\",\"en_plugins_numbers.md\":\"Bq4rxFQ-\",\"en_plugins_outerframe.md\":\"dcqaEX5L\",\"en_plugins_painter.md\":\"BPjDkK8N\",\"en_plugins_rainbowlines.md\":\"KB27VR0m\",\"en_plugins_richtext.md\":\"C0xjUJ1Y\",\"en_plugins_scrollbar.md\":\"BTY-WRIo\",\"en_plugins_search.md\":\"oq27WGrC\",\"en_plugins_select.md\":\"BBkzcWfg\",\"en_plugins_themes.md\":\"Cy2wJvDH\",\"en_plugins_touchevent.md\":\"-uR6MDoD\",\"en_plugins_watermark.md\":\"hn2ARitq\",\"en_start_changelog.md\":\"mcHyuMP6\",\"en_start_contribute.md\":\"BRc1GZjd\",\"en_start_deploy.md\":\"CyMntFzl\",\"en_start_introduction.md\":\"BPmJhLYM\",\"en_start_question.md\":\"BNQEVRBY\",\"en_start_start.md\":\"t8Q0EWDl\",\"help_help1.md\":\"BUHB1yvC\",\"help_help2.md\":\"DnwTpD2s\",\"help_help3.md\":\"D5oc_2Ls\",\"help_help4.md\":\"CP5zGCjY\",\"help_help5.md\":\"DNO2uUSL\",\"help_help6.md\":\"BNhR7MF-\",\"index.md\":\"DGLAchCw\",\"plugins_about.md\":\"DYoMr7Ye\",\"plugins_associativeline.md\":\"DYIBkSHw\",\"plugins_checkbox.md\":\"BT_i6sXp\",\"plugins_cooperate.md\":\"Dm0944RZ\",\"plugins_demonstrate.md\":\"D7m2ejPJ\",\"plugins_doexport.md\":\"D9DXqnn7\",\"plugins_drag.md\":\"DvHqkvDB\",\"plugins_excel.md\":\"Bso-N9QM\",\"plugins_formula.md\":\"4-1aZ69F\",\"plugins_freemind.md\":\"tQ8FmSjZ\",\"plugins_handdrawnlikestyle.md\":\"SRc_y_hE\",\"plugins_keyboardnavigation.md\":\"D_O1v-Qq\",\"plugins_minimap.md\":\"CEavzRCD\",\"plugins_nodeimgadjust.md\":\"B5AEnFgt\",\"plugins_notation.md\":\"Da_S_k1x\",\"plugins_numbers.md\":\"DERrL3cA\",\"plugins_outerframe.md\":\"cQsgask1\",\"plugins_painter.md\":\"CyBPCEqq\",\"plugins_rainbowlines.md\":\"DQGhN6QN\",\"plugins_richtext.md\":\"CM1KiL10\",\"plugins_scrollbar.md\":\"C_0OnaGr\",\"plugins_search.md\":\"D_bnL8rb\",\"plugins_select.md\":\"CukB6FsP\",\"plugins_themes.md\":\"HPkGe_d3\",\"plugins_touchevent.md\":\"Cdz_63tT\",\"plugins_watermark.md\":\"1UCHago3\",\"sponsor.md\":\"DEcuXGmu\",\"start_changelog.md\":\"DcdV5GNW\",\"start_contribute.md\":\"V6_XRS2W\",\"start_deploy.md\":\"jxHFH1Ph\",\"start_introduction.md\":\"Dn2yO_zK\",\"start_question.md\":\"bkFCXRSd\",\"start_start.md\":\"lmUjiRmx\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"SimpleMindMap\",\"description\":\"A VitePress site\",\"base\":\"/mind-map-docs/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"search\":{\"provider\":\"local\",\"options\":{\"locales\":{\"root\":{\"placeholder\":\"搜索文档\",\"translations\":{\"button\":{\"buttonText\":\"搜索文档\",\"buttonAriaLabel\":\"搜索文档\"},\"modal\":{\"searchBox\":{\"resetButtonTitle\":\"清除查询条件\",\"resetButtonAriaLabel\":\"清除查询条件\",\"cancelButtonText\":\"取消\",\"cancelButtonAriaLabel\":\"取消\"},\"startScreen\":{\"recentSearchesTitle\":\"搜索历史\",\"noRecentSearchesText\":\"没有搜索历史\",\"saveRecentSearchButtonTitle\":\"保存至搜索历史\",\"removeRecentSearchButtonTitle\":\"从搜索历史中移除\",\"favoriteSearchesTitle\":\"收藏\",\"removeFavoriteSearchButtonTitle\":\"从收藏中移除\"},\"errorScreen\":{\"titleText\":\"无法获取结果\",\"helpText\":\"你可能需要检查你的网络连接\"},\"footer\":{\"selectText\":\"选择\",\"navigateText\":\"切换\",\"closeText\":\"关闭\",\"searchByText\":\"搜索提供者\"},\"noResultsScreen\":{\"noResultsText\":\"无法找到相关结果\",\"suggestedQueryText\":\"你可以尝试查询\",\"reportMissingResultsText\":\"你认为该查询应该有结果？\",\"reportMissingResultsLinkText\":\"点击反馈\"}}}}}}}},\"locales\":{\"root\":{\"label\":\"中文\",\"description\":\"一个强大的Web思维导图\",\"themeConfig\":{\"logo\":\"/logo.png\",\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/wanglin2/mind-map\"}],\"footer\":{\"message\":\"MIT License.\",\"copyright\":\"Copyright © 2024-present mind-map team\"},\"outline\":{\"level\":[2,3]},\"nav\":[{\"text\":\"在线使用\",\"link\":\"https://wanglin2.github.io/mind-map/\"},{\"text\":\"客户端\",\"link\":\"/client\"},{\"text\":\"云存储版\",\"link\":\"/cloudStorage\"},{\"text\":\"开始\",\"link\":\"/start/introduction\",\"activeMatch\":\"/start/\"},{\"text\":\"教程\",\"link\":\"/course/course1\",\"activeMatch\":\"/course/\"},{\"text\":\"API\",\"link\":\"/api/constructor/constructor-options\",\"activeMatch\":\"/api/\"},{\"text\":\"插件\",\"link\":\"/plugins/themes\",\"activeMatch\":\"/plugins/\"},{\"text\":\"使用帮助\",\"link\":\"/help/help1\",\"activeMatch\":\"/help/\"},{\"text\":\"赞助\",\"link\":\"/sponsor\"},{\"text\":\"更多\",\"items\":[{\"text\":\"博客\",\"link\":\"/blog\"},{\"text\":\"理想文档\",\"link\":\"https://github.com/wanglin2/lx-doc\"},{\"text\":\"意见反馈\",\"link\":\"https://github.com/wanglin2/mind-map/issues\"}]}],\"sidebar\":{\"/start/\":[{\"text\":\"简介\",\"link\":\"/start/introduction\"},{\"text\":\"开始\",\"link\":\"/start/start\"},{\"text\":\"常见问题\",\"link\":\"/start/question\"},{\"text\":\"部署\",\"link\":\"/start/deploy\"},{\"text\":\"贡献\",\"link\":\"/start/contribute\"},{\"text\":\"更新记录\",\"link\":\"/start/changelog\"}],\"/course/\":[{\"text\":\"基本使用\",\"link\":\"/course/course1\"},{\"text\":\"操作节点内容\",\"link\":\"/course/course2\"},{\"text\":\"插入/删除节点、前进回退\",\"link\":\"/course/course3\"},{\"text\":\"设置节点样式的简单方式\",\"link\":\"/course/course4\"},{\"text\":\"设置节点样式的更多方式\",\"link\":\"/course/course31\"},{\"text\":\"设置基础样式\",\"link\":\"/course/course5\"},{\"text\":\"显示水印\",\"link\":\"/course/course6\"},{\"text\":\"开启节点自由拖拽\",\"link\":\"/course/course7\"},{\"text\":\"开启节点富文本编辑\",\"link\":\"/course/course8\"},{\"text\":\"修改鼠标滚轮的行为\",\"link\":\"/course/course9\"},{\"text\":\"主题\",\"link\":\"/course/course10\"},{\"text\":\"结构\",\"link\":\"/course/course11\"},{\"text\":\"如何渲染一个大纲\",\"link\":\"/course/course12\"},{\"text\":\"快捷键\",\"link\":\"/course/course13\"},{\"text\":\"如何渲染一个小地图\",\"link\":\"/course/course14\"},{\"text\":\"如何渲染一个右键菜单\",\"link\":\"/course/course15\"},{\"text\":\"如何渲染富文本的悬浮工具栏\",\"link\":\"/course/course16\"},{\"text\":\"导入和导出\",\"link\":\"/course/course17\"},{\"text\":\"如何持久化数据\",\"link\":\"/course/course18\"},{\"text\":\"插入和扩展节点图标\",\"link\":\"/course/course19\"},{\"text\":\"如何自定义节点内容\",\"link\":\"/course/course20\"},{\"text\":\"如何复制、剪切、粘贴\",\"link\":\"/course/course21\"},{\"text\":\"如何实现搜索、替换\",\"link\":\"/course/course22\"},{\"text\":\"如何渲染滚动条\",\"link\":\"/course/course23\"},{\"text\":\"如何开发一个插件\",\"link\":\"/course/course24\"},{\"text\":\"关于概要\",\"link\":\"/course/course25\"},{\"text\":\"如何实现AI生成节点内容\",\"link\":\"/course/course26\"},{\"text\":\"快捷键操作如何传递自定义参数\",\"link\":\"/course/course27\"},{\"text\":\"如何动态修改自定义元素的大小\",\"link\":\"/course/course28\"},{\"text\":\"局域网docker部署解决HTTPS问题的一种方法\",\"link\":\"/course/course29\"},{\"text\":\"如何通过代码激活节点\",\"link\":\"/course/course30\"}],\"/api/\":[{\"text\":\"API\",\"items\":[{\"text\":\"构造函数\",\"base\":\"/api/constructor/constructor-\",\"items\":[{\"text\":\"实例化选项\",\"link\":\"options\"},{\"text\":\"属性\",\"link\":\"props\"},{\"text\":\"方法\",\"link\":\"methods\"}]},{\"text\":\"Node类\",\"link\":\"/api/node\"},{\"text\":\"Render类\",\"link\":\"/api/render\"},{\"text\":\"Command类\",\"link\":\"/api/command\"},{\"text\":\"TextEdit类\",\"link\":\"/api/textEdit\"},{\"text\":\"View类\",\"link\":\"/api/view\"},{\"text\":\"KeyCommand类\",\"link\":\"/api/keyCommand\"},{\"text\":\"BatchExecution类\",\"link\":\"/api/batchExecution\"},{\"text\":\"XMind解析\",\"link\":\"/api/xmind\"},{\"text\":\"Markdown解析\",\"link\":\"/api/markdown\"},{\"text\":\"内置工具方法\",\"link\":\"/api/utils\"}]}],\"/plugins/\":[{\"text\":\"免费\",\"items\":[{\"text\":\"Themes 插件\",\"link\":\"/plugins/themes\"},{\"text\":\"RichText插件\",\"link\":\"/plugins/richText\"},{\"text\":\"Export 插件\",\"link\":\"/plugins/doExport\"},{\"text\":\"Drag插件\",\"link\":\"/plugins/drag\"},{\"text\":\"Select 插件 \",\"link\":\"/plugins/select\"},{\"text\":\"AssociativeLine 插件\",\"link\":\"/plugins/associativeLine\"},{\"text\":\"KeyboardNavigation插件\",\"link\":\"/plugins/keyboardNavigation\"},{\"text\":\"MiniMap插件\",\"link\":\"/plugins/miniMap\"},{\"text\":\"Watermark插件\",\"link\":\"/plugins/watermark\"},{\"text\":\"TouchEvent插件\",\"link\":\"/plugins/touchEvent\"},{\"text\":\"NodeImgAdjust插件\",\"link\":\"/plugins/nodeImgAdjust\"},{\"text\":\"Search插件\",\"link\":\"/plugins/search\"},{\"text\":\"Painter插件\",\"link\":\"/plugins/painter\"},{\"text\":\"Scrollbar插件\",\"link\":\"/plugins/scrollbar\"},{\"text\":\"Formula插件\",\"link\":\"/plugins/formula\"},{\"text\":\"Cooperate插件\",\"link\":\"/plugins/cooperate\"},{\"text\":\"RainbowLines插件\",\"link\":\"/plugins/rainbowLines\"},{\"text\":\"Demonstrate插件\",\"link\":\"/plugins/demonstrate\"},{\"text\":\"OuterFrame插件\",\"link\":\"/plugins/outerFrame\"}]},{\"text\":\"收费\",\"items\":[{\"text\":\"关于收费插件\",\"link\":\"/plugins/about\"},{\"text\":\"HandDrawnLikeStyle插件\",\"link\":\"/plugins/handDrawnLikeStyle\"},{\"text\":\"Notation插件\",\"link\":\"/plugins/notation\"},{\"text\":\"Numbers插件\",\"link\":\"/plugins/numbers\"},{\"text\":\"Freemind插件\",\"link\":\"/plugins/freemind\"},{\"text\":\"Excel插件\",\"link\":\"/plugins/excel\"},{\"text\":\"Checkbox插件\",\"link\":\"/plugins/checkbox\"}]}],\"/help/\":[{\"text\":\"概要/关联线\",\"link\":\"/help/help1\"},{\"text\":\"客户端\",\"link\":\"/help/help2\"},{\"text\":\"打开预览在线文件\",\"link\":\"/help/help3\"},{\"text\":\"复制粘贴\",\"link\":\"/help/help4\"},{\"text\":\"导出\",\"link\":\"/help/help5\"},{\"text\":\"如何编辑数学公式\",\"link\":\"/help/help6\"}]},\"darkModeSwitchLabel\":\"暗黑模式\",\"outlineTitle\":\"大纲\",\"docFooter\":{\"prev\":\"上一篇\",\"next\":\"下一篇\"}}},\"en\":{\"label\":\"English\",\"description\":\"A powerful web mind map\",\"themeConfig\":{\"logo\":\"/logo.png\",\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/wanglin2/mind-map\"}],\"footer\":{\"message\":\"MIT License.\",\"copyright\":\"Copyright © 2024-present mind-map team\"},\"outline\":{\"level\":[2,3]},\"nav\":[{\"text\":\"Online use\",\"link\":\"https://wanglin2.github.io/mind-map/\"},{\"text\":\"Client\",\"link\":\"/en/client\"},{\"text\":\"Cloud storage\",\"link\":\"/cloudStorage\"},{\"text\":\"Start\",\"link\":\"/en/start/introduction\",\"activeMatch\":\"/en/start/\"},{\"text\":\"Course\",\"link\":\"/course/course1\",\"activeMatch\":\"/course/\"},{\"text\":\"API\",\"link\":\"/en/api/constructor/constructor-options\",\"activeMatch\":\"/en/api/\"},{\"text\":\"Plugins\",\"link\":\"/en/plugins/themes\",\"activeMatch\":\"/en/plugins/\"},{\"text\":\"Help\",\"link\":\"/help/help1\",\"activeMatch\":\"/help/\"},{\"text\":\"Sponsor\",\"link\":\"/sponsor\"},{\"text\":\"More\",\"items\":[{\"text\":\"Blog\",\"link\":\"/en/blog\"},{\"text\":\"Ideal Document\",\"link\":\"https://github.com/wanglin2/lx-doc\"},{\"text\":\"Issues\",\"link\":\"https://github.com/wanglin2/mind-map/issues\"}]}],\"sidebar\":{\"/en/start/\":[{\"text\":\"Introduction\",\"link\":\"/en/start/introduction\"},{\"text\":\"Start\",\"link\":\"/en/start/start\"},{\"text\":\"Question\",\"link\":\"/en/start/question\"},{\"text\":\"Deploy\",\"link\":\"/en/start/deploy\"},{\"text\":\"Contribute\",\"link\":\"/en/start/contribute\"},{\"text\":\"Changelog\",\"link\":\"/en/start/changelog\"}],\"/course/\":[{\"text\":\"基本使用\",\"link\":\"/course/course1\"},{\"text\":\"操作节点内容\",\"link\":\"/course/course2\"},{\"text\":\"插入/删除节点、前进回退\",\"link\":\"/course/course3\"},{\"text\":\"设置节点样式的简单方式\",\"link\":\"/course/course4\"},{\"text\":\"设置节点样式的更多方式\",\"link\":\"/course/course31\"},{\"text\":\"设置基础样式\",\"link\":\"/course/course5\"},{\"text\":\"显示水印\",\"link\":\"/course/course6\"},{\"text\":\"开启节点自由拖拽\",\"link\":\"/course/course7\"},{\"text\":\"开启节点富文本编辑\",\"link\":\"/course/course8\"},{\"text\":\"修改鼠标滚轮的行为\",\"link\":\"/course/course9\"},{\"text\":\"主题\",\"link\":\"/course/course10\"},{\"text\":\"结构\",\"link\":\"/course/course11\"},{\"text\":\"如何渲染一个大纲\",\"link\":\"/course/course12\"},{\"text\":\"快捷键\",\"link\":\"/course/course13\"},{\"text\":\"如何渲染一个小地图\",\"link\":\"/course/course14\"},{\"text\":\"如何渲染一个右键菜单\",\"link\":\"/course/course15\"},{\"text\":\"如何渲染富文本的悬浮工具栏\",\"link\":\"/course/course16\"},{\"text\":\"导入和导出\",\"link\":\"/course/course17\"},{\"text\":\"如何持久化数据\",\"link\":\"/course/course18\"},{\"text\":\"插入和扩展节点图标\",\"link\":\"/course/course19\"},{\"text\":\"如何自定义节点内容\",\"link\":\"/course/course20\"},{\"text\":\"如何复制、剪切、粘贴\",\"link\":\"/course/course21\"},{\"text\":\"如何实现搜索、替换\",\"link\":\"/course/course22\"},{\"text\":\"如何渲染滚动条\",\"link\":\"/course/course23\"},{\"text\":\"如何开发一个插件\",\"link\":\"/course/course24\"},{\"text\":\"关于概要\",\"link\":\"/course/course25\"},{\"text\":\"如何实现AI生成节点内容\",\"link\":\"/course/course26\"},{\"text\":\"快捷键操作如何传递自定义参数\",\"link\":\"/course/course27\"},{\"text\":\"如何动态修改自定义元素的大小\",\"link\":\"/course/course28\"},{\"text\":\"局域网docker部署解决HTTPS问题的一种方法\",\"link\":\"/course/course29\"},{\"text\":\"如何通过代码激活节点\",\"link\":\"/course/course30\"}],\"/en/api/\":[{\"text\":\"API\",\"items\":[{\"text\":\"Constructor\",\"base\":\"/en/api/constructor/constructor-\",\"items\":[{\"text\":\"Options\",\"link\":\"options\"},{\"text\":\"Props\",\"link\":\"props\"},{\"text\":\"Methods\",\"link\":\"methods\"}]},{\"text\":\"Node class\",\"link\":\"/en/api/node\"},{\"text\":\"Render clas\",\"link\":\"/en/api/render\"},{\"text\":\"Command clas\",\"link\":\"/en/api/command\"},{\"text\":\"TextEdit clas\",\"link\":\"/en/api/textEdit\"},{\"text\":\"View clas\",\"link\":\"/en/api/view\"},{\"text\":\"KeyCommand clas\",\"link\":\"/en/api/keyCommand\"},{\"text\":\"BatchExecution clas\",\"link\":\"/en/api/batchExecution\"},{\"text\":\"XMind parse\",\"link\":\"/en/api/xmind\"},{\"text\":\"Markdown parse\",\"link\":\"/en/api/markdown\"},{\"text\":\"Utility methods\",\"link\":\"/en/api/utils\"}]}],\"/en/plugins/\":[{\"text\":\"Free\",\"items\":[{\"text\":\"Themes plugin\",\"link\":\"/en/plugins/themes\"},{\"text\":\"RichText plugin\",\"link\":\"/en/plugins/richText\"},{\"text\":\"Export plugin\",\"link\":\"/en/plugins/doExport\"},{\"text\":\"Drag plugin\",\"link\":\"/en/plugins/drag\"},{\"text\":\"Select plugin\",\"link\":\"/en/plugins/select\"},{\"text\":\"AssociativeLine plugin\",\"link\":\"/en/plugins/associativeLine\"},{\"text\":\"KeyboardNavigation plugin\",\"link\":\"/en/plugins/keyboardNavigation\"},{\"text\":\"MiniMap plugin\",\"link\":\"/en/plugins/miniMap\"},{\"text\":\"Watermark plugin\",\"link\":\"/en/plugins/watermark\"},{\"text\":\"TouchEvent plugin\",\"link\":\"/en/plugins/touchEvent\"},{\"text\":\"NodeImgAdjust plugin\",\"link\":\"/en/plugins/nodeImgAdjust\"},{\"text\":\"Search plugin\",\"link\":\"/en/plugins/search\"},{\"text\":\"Painter plugin\",\"link\":\"/en/plugins/painter\"},{\"text\":\"Scrollbar plugin\",\"link\":\"/en/plugins/scrollbar\"},{\"text\":\"Formula plugin\",\"link\":\"/en/plugins/formula\"},{\"text\":\"Cooperate plugin\",\"link\":\"/en/plugins/cooperate\"},{\"text\":\"RainbowLines plugin\",\"link\":\"/en/plugins/rainbowLines\"},{\"text\":\"Demonstrate plugin\",\"link\":\"/en/plugins/demonstrate\"},{\"text\":\"OuterFrame plugin\",\"link\":\"/en/plugins/outerFrame\"}]},{\"text\":\"Charge\",\"items\":[{\"text\":\"Regarding paid plugins\",\"link\":\"/en/plugins/about\"},{\"text\":\"HandDrawnLikeStyle plugin\",\"link\":\"/en/plugins/handDrawnLikeStyle\"},{\"text\":\"Notation plugin\",\"link\":\"/en/plugins/notation\"},{\"text\":\"Numbers plugin\",\"link\":\"/en/plugins/numbers\"},{\"text\":\"Freemind plugin\",\"link\":\"/en/plugins/freemind\"},{\"text\":\"Excel plugin\",\"link\":\"/en/plugins/excel\"},{\"text\":\"Checkbox plugin\",\"link\":\"/en/plugins/checkbox\"}]}],\"/help/\":[{\"text\":\"概要/关联线\",\"link\":\"/help/help1\"},{\"text\":\"客户端\",\"link\":\"/help/help2\"},{\"text\":\"打开预览在线文件\",\"link\":\"/help/help3\"},{\"text\":\"复制粘贴\",\"link\":\"/help/help4\"},{\"text\":\"导出\",\"link\":\"/help/help5\"},{\"text\":\"如何编辑数学公式\",\"link\":\"/help/help6\"}]},\"darkModeSwitchLabel\":\"Dark mode\",\"outlineTitle\":\"Outline\",\"docFooter\":{\"prev\":\"Prev\",\"next\":\"Next\"}}}},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
    
  </body>
</html>